# demo02_noname.py  匿名函数
def add(n1, n2):
    return n1 + n2
def func01(num):
    # if num % 2 == 1:
    #     return True
    # else:
    #     return False
    # if表达式
    return True if num % 2 == 1 else False
myadd = lambda n1, n2: n1 + n2  # 不推荐
test = lambda num: True if num % 2 == 1 else False
if __name__ == '__main__':
    print(test(101))  # True
    print(func01(100))  # False
    print(add(1, 2))  # 3
    print(myadd(10, 20))  # 30
